<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">

<head>
    <title>工资管理</title>
    <th:block th:replace="/backstage/common_resources::common_css"></th:block>
    <th:block th:replace="/backstage/common_resources::common_js"></th:block>
</head>

<body class="hold-transition skin-purple sidebar-mini">

<header th:replace="~{/backstage/common_header::header}"></header>
<aside th:replace="~{/backstage/common_aside::aside}"></aside>

    <div class="wrapper">
        <div class="content-wrapper">

            <!-- 内容头部 -->
            <section class="content-header">
                <h1>
                    工资管理
                    <small>工资列表</small>
                </h1>
                <ol class="breadcrumb">
                    <li><a th:href="@{/backstage/index}"><i class="fa fa-dashboard"></i> 首页</a></li>
                    <li><a th:href="@{/backstage/salary/all}">工资管理</a></li>
                    <li class="active">工资列表</li>
                </ol>
            </section>
            <!-- 内容头部 /-->

            <!-- 正文区域 -->
            <section class="content">

                <!-- .box-body -->
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title">列表</h3>
                    </div>

                    <div class="box-body">

                        <!-- 数据表格 -->
                        <div class="table-box"   style="overflow:auto;max-height: 350px;">

                            <!--工具栏-->


                                <div class="box-tools pull-left" style="display: flex;margin-right: 30px;">
                                    <div class="btn-group">
                                        <a th:href="@{/backstage/salary_add}">
                                            <button type="button" class="btn btn-default" title="新建"><i class="fa fa-file-o"></i> 新建</button>

                                        </a>
                                    </div>
                                    <form action="/backstage/salary/find">
                                    <div class="has-feedback" style="display: flex">
                                        <input type="text" class="form-control input-sm" name="search"  placeholder="搜索">

                                        <button type="submit" class="glyphicon glyphicon-search ">

                                        </button>
                                    </div>
                                    </form>
                                </div>

                            <!--工具栏/-->

                            <!--数据列表-->
                            <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                                <thead>
                                <tr>

                                    <th >工号</th>
                                    <th >姓名</th>
                                    <th >工龄</th>
                                    <th >基本工资</th>
                                    <th >加班费</th>
                                    <th >补贴</th>
                                    <th >奖金</th>
                                    <th >总工资</th>
                                    <th >时间</th>
                                    <th >操作</th>
                                </tr>
                                </thead>
                                <tbody>

                                <tr th:each="salary:${allSalary}">
                                    <td th:text="${salary.users.username}"></td>
                                    <td th:text="${salary.users.name}"></td>
                                    <td th:text="${salary.users.workAge}"></td>
                                    <td th:text="${salary.basicSalary}"></td>
                                    <td th:text="${salary.overSalary}"></td>
                                    <td th:text="${salary.subsidy}"></td>
                                    <td th:text="${salary.prize}"></td>
                                    <td  th:text="${salary.basicSalary}+${salary.overSalary}+${salary.users.workAge}*1.00*${salary.subsidy}+${salary.prize}"></td>
                                    <td th:text="${salary.time}"></td>

                                    <td class="text-center">

                                        <a th:href="@{/backstage/salary/edit(sid=${salary.sid})}" class="btn bg-green btn-xs">修改</a>
                                        <a th:href="@{/backstage/salary/delete(sid=${salary.sid})}" class="btn bg-red btn-xs">删除</a>
                                    </td>

                                </tr>
                                </tbody>
                            </table>
                            <!--数据列表/-->
                            <!--工具栏/-->
                        </div>
                        <!-- 数据表格 /-->
                    </div>
                    <!-- /.box-body -->


                </div>
            </section>
            <!-- 正文区域 /-->
        </div>
    </div>

<footer th:replace="~{/backstage/common_footer::footer}"></footer>

</body>

</html>